package cn.wolfcode.productserver.service.impl;

import cn.wolfcode.productserver.domain.Product;
import cn.wolfcode.productserver.repository.ProductRepository;
import cn.wolfcode.productserver.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author JMJ
 * @date 2021/3/22 14:23
 */
@Service
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductRepository productRepository;


    @Override
    public Product findById(Long pid) {
        return productRepository.findById(pid).get();
    }
}
